package com.blog.personalblog.service;

import com.blog.personalblog.DTO.UserDto;
import com.blog.personalblog.entity.User;
import com.blog.personalblog.entity.response.ServiceResponse;

import java.util.List;

public interface UserService {
    /**
     * 获取所有的用户
     * @return
     */
    ServiceResponse<List<User>> getAllUser();

    /**
     * 添加新用户
     * @param user
     * @return
     */
    ServiceResponse<Boolean> createUser(UserDto user);

    /**
     * 更新用户信息
     * @param user
     * @return
     */
    ServiceResponse<Boolean> updateUser(UserDto user);

    /**
     * 根据id删除用户信息
     * @param id
     * @return
     */
    ServiceResponse<Boolean> deleteUser(int id);

}
